<template>
  <div id="app">
    <Headertop v-show="$route.meta.showTop"></Headertop>
    <Headerseach v-show="$route.meta.showSearch"></Headerseach>

    <router-view />
  </div>
</template>
<script>
import Headertop from '@/components/headertop.vue'

import Headerseach from '@/components/headerseach.vue'
import { mapActions } from 'vuex'

export default {
  components: {
    Headertop,
    Headerseach
  },
  mounted() {
    let userinfo = JSON.parse(window.localStorage.getItem('userinfo'))
    if (userinfo) {
      this.syncUserInfo(userinfo)
    }
  },
  methods: {
    ...mapActions(['syncUserInfo'])
  }
}
</script>
    Headerseachpt>

<style lang="less">
</style>
